package Unit

import (
	xml "misc/dom4g"
)

const (
	Ability_MoveId   = 0
	Ability_AttackId = 1
)

type IAbility interface {
	GetId() int
	GetAbilityInfo() *AbilityInfo
	Update()
	OnEnter()
}

type AbilityInfo struct {
	AbiliUnit *Unit
}

func (this *AbilityInfo) OnEnter() {

}

var AbilitiesMap map[string]func(*xml.Element) IAbility

func GetAbilityNewFunc(name string) func(*xml.Element) IAbility {
	return AbilitiesMap[name]
}
